<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        html,
        body {
            width: 100%;
            height: 100%;
        }
        
        .box {
            width: 600px;
            height: 100%;
            margin: auto;
            padding-top: 100px;
            background-color: #ccc;
        }
        
        .news {
            height: 50px;
        }
        
        .hd {
            float: left;
            width: 100px;
            height: 50px;
            background-color: orange;
        }
        
        .bd {
            position: relative;
            float: left;
            width: 500px;
            height: 50px;
            line-height: 50px;
            overflow: hidden;
        }
        
        .text p:first-child {
            position: absolute;
            top: 0;
            left: 0;
        }
        
        .text p:last-child {
            position: absolute;
            top: 0;
            left: 50%;
        }
        
        .text {
            width: 200%;
            height: 100%;
            animation: move 5s linear infinite;
        }
        
        @keyframes move {
            0% {
                transform: translateX(0px);
            }
            100% {
                transform: translateX(-50%);
            }
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="news">
            <div class="hd"></div>
            <div class="bd">
                <div class="text">
                    <p>从前有座山，山里有座庙，庙里有个页面找呀找不到</p>
                    <p>从前有座山，山里有座庙，庙里有个页面找呀找不到</p>

                </div>
            </div>
        </div>
    </div>
</body>

</html>